import request from '@/utils/request';
import {defaultBaseRequest} from "../utils/request";


export function fetchStaysList(args) {
  let {params, data, device_id} = args;
  if (device_id) {
    return request({
      url: 'userstays/',
      params: {device_id, ...params},
    });
  }
  return request({
    method: 'post',
    url: 'userstays/',
    params,
    data,
  });
}

export function fetchTrailList(params) {
  return request({
    url: 'raw_data/',
    params,
  });
}


export function fetchLatestStaysList() {
  return request({
    url: 'userstays/',
  });
}






export function createShareMapLink(data) {
  return request({
    method: 'post',
    url: 'share_map/',
    data,
  });
}




